package com.siwei.mes.entity.sync.erp;

import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;


/**
 * 工程信息(ErpProject)实体类
 *
 * @author linzi
 * @since 2024-07-25 16:52:15
 */
@Data
@Accessors(chain = true)
@Table(name = "erp_project")
@ApiModel(value = "ErpProject", description = "工程信息")
public class ErpProject implements Serializable {
    private static final long serialVersionUID = 567999777903644215L;
    /**
     * 主键id
     */
    @Id
    @ApiModelProperty(value = "工程信息主键ID", name = "id")
    private Long id;
    /**
     * 协会唯一标识  Contract_Info 表的Contract_Id
     */
    @Column(name = "laboratory_id")
    @ApiModelProperty(value = "协会唯一标识", name = "laboratoryId")
    private String laboratoryId;
    /**
     * erpCustomer表的id
     */
    @Column(name = "erp_customer_id")
    @ApiModelProperty(value = "erpCustomer表的id", name = "erpCustomerId")
    private Long erpCustomerId;

    @Column(name = "is_iron_mark")
    @ApiModelProperty(value = "是否铁标工程  0-否 1-是")
    private Integer isIronMark;

    /**
     * 合同编号
     */
    @Column(name = "contract_no")
    @ApiModelProperty(value = "合同编号", name = "contractNo")
    private String contractNo;

    @Column(name = "contract_name")
    @ApiModelProperty(value = "合同名称")
    private String contractName;
    /**
     * 合同工程名称  -- ERP工程名称
     */
    @Column(name = "project_name")
    @ApiModelProperty(value = "工程名称", name = "projectName")
    private String projectName;

    @Column(name = "laboratory_project_name")
    @ApiModelProperty(value = "协会工程名称")
    private String laboratoryProjectName;
    /**
     * 工程地址
     */
    @Column(name = "project_address")
    @ApiModelProperty(value = "工程地址", name = "projectAddress")
    private String projectAddress;

    @Column(name = "lng")
    @ApiModelProperty(value = "经度")
    private Double lng;

    @Column(name = "lat")
    @ApiModelProperty(value = "纬度")
    private Double lat;
    /**
     * 签订日期
     */
    @Column(name = "sign_date")
    @ApiModelProperty(value = "签订日期", name = "signDate")
    private Date signDate;
    /**
     * 报建编号
     */
    @Column(name = "bjbh")
    @ApiModelProperty(value = "报建编号", name = "bjbh")
    private String bjbh;
    /**
     * 建设单位
     */
    @Column(name = "jsdw")
    @ApiModelProperty(value = "建设单位", name = "jsdw")
    private String jsdw;
    /**
     * 施工单位
     */
    @Column(name = "sgdw")
    @ApiModelProperty(value = "施工单位", name = "sgdw")
    private String sgdw;
    /**
     * 监理单位
     */
    @Column(name = "jldw")
    @ApiModelProperty(value = "监理单位", name = "jldw")
    private String jldw;
    /**
     * 合同类型  0-报建合同  1-非报建合同
     */
    @Column(name = "contract_type")
    @ApiModelProperty(value = "合同类型  0-报建合同  1-非报建合同", name = "contractType")
    private Integer contractType;


    @Column(name = "link_man")
    @ApiModelProperty(value = "工程联系人")
    private String linkMan;

    @Column(name = "link_tel")
    @ApiModelProperty(value = "'联系电话'")
    private String linkTel;

    @Column(name = "project_area")
    @ApiModelProperty(value = "工程区域")
    private String projectArea;

    @Column(name = "shdw")
    @ApiModelProperty(value = "收货单位")
    private String shdw;

    @Column(name = "jdh")
    @ApiModelProperty(value = "工程监督号")
    private String jdh;

    @Column(name = "project_radius")
    @ApiModelProperty(value = "工程半径")
    private String projectRadius;

    @Column(name = "project_haul_distance")
    @ApiModelProperty(value = "工程运距")
    private String projectHaulDistance;

    @Column(name = "project_fence")
    @ApiModelProperty(value = "电子围栏")
    private String projectFence;

    @Column(name = "project_material")
    @ApiModelProperty(value = "绑定物料json")
    private JSONObject projectMaterial;

    /*
     * 创建时间
     */
    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间", name = "createTime")
    private Date createTime;
    /**
     * 更新时间
     */
    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间", name = "updateTime")
    private Date updateTime;

    @Column(name = "is_update")
    @ApiModelProperty(value = "是否修改 1-修改  0-未修改")
    private Integer isUpdate;
    /**
     * 是否删除  1-删除
     */
    @Column(name = "is_del")
    @ApiModelProperty(value = "是否删除  1-删除", name = "isDel")
    private Integer isDel;

    @Column(name = "is_upload")
    @ApiModelProperty(value = "是否上传协会 1-上传 0-未上传")
    private Integer isUpload;

    @Column(name = "error_msg")
    @ApiModelProperty(value = "上传错误错误信息")
    private String errorMsg;


    @Transient
    @ApiModelProperty("累计抽检")
    private Integer experimentCount;

    @Transient
    @ApiModelProperty("抽检异常")
    private Integer experimentExpCount;

    /**
     * 累计方数
     */
    @Transient
    @ApiModelProperty(value = "累计方数", name = "totalvolume")
    private Float totalVolume;
    /**
     * 任务单数
     */
    @Transient
    @ApiModelProperty(value = "任务单数", name = "tasklistnum")
    private Integer taskListNum;

    @Transient
    @ApiModelProperty(value = "收货单位")
    private String receiveCompanyName;
}
